package com.hy.item.api;

import com.hy.item.pojo.SpecGroup;
import com.hy.item.pojo.SpecParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface SpecificationApi {

    /**
     * 根据参数查询规格参数
     */
    @GetMapping("spec/params")
    List<SpecParam> queryParamList(
            @RequestParam(value = "gid",required = false) Long gid,
            @RequestParam(value = "cid",required = false) Long cid,
            @RequestParam(value = "searching",required =false) Boolean searching

    );

    /**
     * 根据分类id查询规格组及规格参数
     * @return
     */
    @GetMapping("spec/group")
     List<SpecGroup> queryListByCid(@RequestParam("cid") Long cid);

}
